package com.miplus.ccrm.core.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import lombok.Data;

/**
 * 合同信息表
 * @TableName IOU_CONTRACT
 */
@TableName(value ="IOU_CONTRACT")
@Data
public class IouContract implements Serializable {
    /**
     * 合同编号
     */
    @TableId
    private String contractnumber;

    /**
     * 合同额度
     */
    private BigDecimal amount;

    /**
     * 签订日期
     */
    private Date signdt;

    /**
     * 有效起始日期
     */
    private Date startdt;

    /**
     * 有效结束日期
     */
    private Date enddt;

    /**
     * 最近更新时间
     */
    private Date updt;

    /**
     * 合同产品编号
     */
    private String prodcode;

    /**
     * 合同名称
     */
    private String contractname;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        IouContract other = (IouContract) that;
        return (this.getContractnumber() == null ? other.getContractnumber() == null : this.getContractnumber().equals(other.getContractnumber()))
            && (this.getAmount() == null ? other.getAmount() == null : this.getAmount().equals(other.getAmount()))
            && (this.getSigndt() == null ? other.getSigndt() == null : this.getSigndt().equals(other.getSigndt()))
            && (this.getStartdt() == null ? other.getStartdt() == null : this.getStartdt().equals(other.getStartdt()))
            && (this.getEnddt() == null ? other.getEnddt() == null : this.getEnddt().equals(other.getEnddt()))
            && (this.getUpdt() == null ? other.getUpdt() == null : this.getUpdt().equals(other.getUpdt()))
            && (this.getProdcode() == null ? other.getProdcode() == null : this.getProdcode().equals(other.getProdcode()))
            && (this.getContractname() == null ? other.getContractname() == null : this.getContractname().equals(other.getContractname()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getContractnumber() == null) ? 0 : getContractnumber().hashCode());
        result = prime * result + ((getAmount() == null) ? 0 : getAmount().hashCode());
        result = prime * result + ((getSigndt() == null) ? 0 : getSigndt().hashCode());
        result = prime * result + ((getStartdt() == null) ? 0 : getStartdt().hashCode());
        result = prime * result + ((getEnddt() == null) ? 0 : getEnddt().hashCode());
        result = prime * result + ((getUpdt() == null) ? 0 : getUpdt().hashCode());
        result = prime * result + ((getProdcode() == null) ? 0 : getProdcode().hashCode());
        result = prime * result + ((getContractname() == null) ? 0 : getContractname().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", contractnumber=").append(contractnumber);
        sb.append(", amount=").append(amount);
        sb.append(", signdt=").append(signdt);
        sb.append(", startdt=").append(startdt);
        sb.append(", enddt=").append(enddt);
        sb.append(", updt=").append(updt);
        sb.append(", prodcode=").append(prodcode);
        sb.append(", contractname=").append(contractname);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}